<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>
  
  <script type="module">
    import { reactive, effect } from './reactivity/index.js'

    const proxy = reactive(new Map([['key', 1]]))
    const m = new Map()
    const p1 = reactive(m)
    const p2 = reactive(m)

    p1.set('p2', p2)

    effect(() => {
      // console.log(proxy.get('key'))
      console.log(m.get('p2').size)
      console.log(m)
    })
    // proxy.set('key', 2)
    m.get('p2').set('foo', 1)

  </script>
</body>
</html>
